#[derive(Debug, PartialEq)]
struct MyI32(i32);

#[test]
fn ownership_basic_test() {
    let x = 5;
    let y = &x;

    let ix = *y;
    let iy = *y;
    assert_eq!(5, ix);
    assert_eq!(5, iy);

    let mx = MyI32(1);
    let my = &mx;
    println!("my {:?}", my);

    // You tried to move out of a value which was borrowed.
    // let nx = *my;
    // can't dereference twice, ownership alread move at above line.
    // let ny = *my;
}
